// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import fastclick from 'fastclick'
import VueLazyload from 'vue-lazyload'
import Cookies from 'js-cookie'

import 'common/stylus/index.styl'

// 作用：移动端vconsole调试
/* eslint-disable no-unused-vars */
// import vConsole from 'vconsole'
// console.log('test')

/* 解决无法播放音乐的问题，必须携带此参数，跨域!!!无效!!! */
// Cookies.set('qqmusic_fromtag', 66, {path: '/', domain: '.qq.com'})
Cookies.set('qqmusic_fromtag', 66, {path: '/'})

/* fastclick解决移动端点击 300ms 延迟 */
fastclick.attach(document.body)

/* 延迟加载 */
Vue.use(VueLazyload, {
  loading: require('common/image/default.png')
})

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  store,
  router,
  components: { App },
  template: '<App/>'
})
